Only treat missing crate lists as empty
authorTobias Bucher <tobiasbucher5991@gmail.com>
Fri, 18 Dec 2015 12:27:08 +0000 (12:27 +0000)
committerTobias Bucher <tobiasbucher5991@gmail.com>
Mon, 11 Jan 2016 00:54:21 +0000 (01:54 +0100)
commitb95141040f785042cdb7f9d926099c36691704c4
treece66d339e9d9dd0563922752efe2c89fc3918912
parentca373452de159491354cf38279dbc19308c91e72
Only treat missing crate lists as empty

The motivation is that errors other than "file not found" could lead to
the file being overwritten by an empty config, e.g. if the `open` call
is interrupted and returns `EINTR`, then this code would read an empty
config and write it back later on. This can probably happen for other
errors as well (`ENFILE`, ...).
src/cargo/ops/cargo_install.rs